package org.platform.controller.knowledge;

import com.mc.mic.core.bo.CmdBO;
import com.mc.mic.core.bus.provider.BaseServiceRegister;
import org.platform.mo.csmo.cmd10001.EventGroupQueryRequestParam;
import org.platform.mo.csmo.cmd10001.EventGroupQueryResponseParam;
import org.platform.mo.csmo.cmd10002.EventGroupAddRequestParam;
import org.platform.mo.csmo.cmd10002.EventGroupAddResponseParam;
import org.platform.mo.csmo.cmd10003.EventGroupDelRequestParam;
import org.platform.mo.csmo.cmd10003.EventGroupDelResponseParam;
import org.platform.mo.csmo.cmd10004.EventGroupModifyRequestParam;
import org.platform.mo.csmo.cmd10004.EventGroupModifyResponseParam;
import org.platform.mo.csmo.cmd10005.EventQueryRequestParam;
import org.platform.mo.csmo.cmd10005.EventQueryResponseParam;
import org.platform.mo.csmo.cmd10006.EventAddRequestParam;
import org.platform.mo.csmo.cmd10006.EventAddResponseParam;
import org.platform.mo.csmo.cmd10007.EventDelRequestParam;
import org.platform.mo.csmo.cmd10007.EventDelResponseParam;
import org.platform.mo.csmo.cmd10008.EventModifyRequestParam;
import org.platform.mo.csmo.cmd10008.EventModifyResponseParam;
import org.platform.mo.csmo.cmd10026.QueryAlarmEventRequestParam;
import org.platform.mo.csmo.cmd10026.QueryAlarmEventResponseParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author FengJie
 * @date 2018/4/16
 */
@RestController
public class EventRegister extends BaseServiceRegister {

    /**
     * 查询当前的监测点组（10001）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10001")
    public CmdBO queryEventGroup(@RequestBody CmdBO<EventGroupQueryRequestParam, EventGroupQueryResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 增加某个监测点组（10002）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10002")
    public CmdBO addEventGroup(@RequestBody CmdBO<EventGroupAddRequestParam, EventGroupAddResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 删除某个监测点组（10003）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10003")
    public CmdBO delEventGroup(@RequestBody CmdBO<EventGroupDelRequestParam, EventGroupDelResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 修改某个监测点组（10004）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10004")
    public CmdBO modifyEventGroup(@RequestBody CmdBO<EventGroupModifyRequestParam, EventGroupModifyResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询某个设备的监测点集合（10005）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10005")
    public CmdBO queryEvent(@RequestBody CmdBO<EventQueryRequestParam, EventQueryResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 增加一个监测点（10006）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10006")
    public CmdBO addEvent(@RequestBody CmdBO<EventAddRequestParam, EventAddResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 删除一个监测点（10007）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10007")
    public CmdBO delEvent(@RequestBody CmdBO<EventDelRequestParam, EventDelResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 修改一个监测点（10008）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10008")
    public CmdBO modifyEvent(@RequestBody CmdBO<EventModifyRequestParam, EventModifyResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询告警表（10026）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10026")
    public CmdBO queryAlarmEvent(@RequestBody CmdBO<QueryAlarmEventRequestParam, QueryAlarmEventResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }


}
